import {Component} from 'react';
import {NavLink,Outlet,Navigate} from 'react-router-dom';
class Index extends Component{
    render(){
        return(
            <div>
                {/* 展示子路由 */}
                <Outlet></Outlet>
                <nav style={{
                    width:"100%",
                    display:'flex',
                    position:"fixed",
                    bottom:"0"
                }}>
                    <div style={{
                        flex:"1",
                        textAlign:"center"
                    }}>
                    <NavLink to='home'>首页</NavLink>
                    </div>
                    <div style={{
                        flex:"1",
                        textAlign:"center"
                    }}>
                    <NavLink to='cart'>购物车</NavLink>
                    </div>
                    <div style={{
                        flex:"1",
                        textAlign:"center"
                    }}>
                    <NavLink to='mine'>我的</NavLink>
                    </div>
                </nav>
                {/* <Navigate to='/index/home'/> */}
            </div>
        )
    }
}
export default Index;